//**********************************************************************************
//GMCMid3Prob3.java
//
//Name: Gabriel Martins	de	Castro
//Class:	COMSC	110L.51
//Date: /2014
//Instructor: Dr.	Chunyan Bai
//
//Purpose: 
//***********************************************************************************

import java.util.Scanner;

public class GMCMid2Prob3
{
      public static void main (String[] args)
   {
      int[] numbers = new int[3];
      int cont = 0;
      int hyp, cat1, cat2;
      
      while(cont<=2)
      {
         System.out.println("Enter a number : ");
         Scanner input = new Scanner(System.in);
         int num = input.nextInt();
         
         if(num == 0)
            System.out.println("Error! Number cannot be 0!");
         else
         {
            numbers[cont] = num;
            cont++;
         }
         
      }
      
      if(numbers[0]>numbers[1])
         if(numbers[0]>numbers[2])
         {
            hyp = numbers[0];
            cat1 = numbers [1];
            cat2 = numbers [2];
         }
         else
         {
            hyp = numbers[2];
            cat1 = numbers[0];
            cat2 = numbers[1];
         }
      else
         if(numbers[1]>numbers[2])
         {
            hyp = numbers[1];
            cat1 = numbers[0];
            cat2 = numbers[2];
         }
         else
         {
            hyp = numbers[2];
            cat1 = numbers[0];
            cat2 = numbers[1];
         }
         
      if((hyp*hyp)==(cat1*cat1)+(cat2*cat2))
         System.out.println("It is a right triangle!");
      else
         System.out.println("Its is not a right triangle!");
   }
}
